]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab: fix Alt+Tab scrolling on initial display
authorDan Winship <danw@gnome.org>
Mon, 18 Apr 2011 13:52:21 +0000 (09:52 -0400)
committerAdel Gadllah <adel.gadllah@gmail.com>
Tue, 26 Apr 2011 19:10:46 +0000 (21:10 +0200)
The initial selection of the Alt+Tab dialog was happening before the
dialog was shown and allocated, and so the "do we need to scroll"
check used bogus coordinates. Fix by showing the dialog (and forcing
an allocation) first.

https://bugzilla.gnome.org/show_bug.cgi?id=647807

js/ui/altTab.js

index 43b75523068363e34cd9cf42f493a82c295c9bb8..736674e92fa2a543d42445eb1f78c13951157041 100644 (file)
@@ -145,6 +145,12 @@ AltTabPopup.prototype = {
 
         this._appIcons = this._appSwitcher.icons;
 
+        // Need to force an allocation so we can figure out whether we
+        // need to scroll when selecting
+        this.actor.opacity = 0;
+        this.actor.show();
+        this.actor.get_allocation_box();
+
         // Make the initial selection
         if (switch_group) {
             if (backward) {
@@ -174,8 +180,6 @@ AltTabPopup.prototype = {
             return false;
         }
 
-        this.actor.opacity = 0;
-        this.actor.show();
         Tweener.addTween(this.actor,
                          { opacity: 255,
                            time: POPUP_FADE_TIME,